Skip to content

fix(cli): seed host exec approvals during bootstrap#176

Open
kumarabhirup wants to merge 1 commit into
mainfrom
fix/bootstrap-host-exec-approvals
Open

fix(cli): seed host exec approvals during bootstrap#176
kumarabhirup wants to merge 1 commit into
mainfrom
fix/bootstrap-host-exec-approvals

Conversation

@kumarabhirup
Copy link
Copy Markdown
Collaborator

@kumarabhirup kumarabhirup commented Apr 13, 2026

Summary

  • write permissive host exec approval defaults to exec-approvals.json before onboarding so web chat can execute from first boot
  • preserve existing host-specific approval rules while forcing the bootstrap defaults needed for Dench Cloud setup
  • extend the bootstrap command tests to cover staged approvals and the persisted config after a full bootstrap cycle

Test plan

  • pnpm exec vitest run --config vitest.unit.config.ts src/cli/bootstrap-external.bootstrap-command.test.ts
  • pnpm exec oxlint --type-aware src/cli/bootstrap-external.ts src/cli/bootstrap-external.bootstrap-command.test.ts (currently reports existing file-level issues in these touched files)

Made with Cursor


Note

High Risk
Writes permissive host-side exec approval defaults during bootstrap, which affects command-execution security policy and could unintentionally relax approvals on some hosts if misapplied.

Overview
Ensures bootstrap seeds a host-side exec approval policy by writing exec-approvals.json alongside openclaw.json before running openclaw onboard, keeping webchat exec unblocked on first boot.

Adds ensureHostExecApprovalDefaults() to force defaults.security="full" and defaults.ask="off" while preserving any existing per-agent approval rules/version, and extends bootstrap tests to assert pre-onboard staging and post-bootstrap persistence of both config layers.

Reviewed by Cursor Bugbot for commit c899923. Bugbot is set up for automated code reviews on this repo. Configure here.

Bootstrap now writes permissive host exec approval defaults before onboard so web chat can execute from first boot. Preserve existing approval rules while reapplying the CLI settings after onboarding.

Made-with: Cursor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant